#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<assert.h>
char* my_strncpy(char* dest, const char* sour, size_t n)
{
	assert(dest && sour);
	char* ret = dest;
	while (n--)
	{
		*dest++ = *sour++;
	}
	return ret;

}
int main()
{
	char str1[] = "To be or not to be";
	char str2[40];
	int len = strlen(str1);
	printf("%s", my_strncpy(str2, str1, len));
	return 0;
}